package com.speily.study.provider.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * @Auther: SPL
 * @Date: 2019-08-06 17:16
 * @Description: - 事物消息实体
 */
@Getter @Setter @Builder
@TableName("t_message_transaction")
public class MessageTransaction extends Model {

    /**
     * 事物消息topic
     */
    private String topic;

    /**
     * 事物ID
     */
    @TableId(type = IdType.INPUT)
    private String id;

    @TableField(value = "create_time")
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
